const updateValue = function(e, dataInfo) {
    let val = e.detail.value;
    let type = e.currentTarget.dataset.type
    let info = this.data[dataInfo];
    info[type] = val;
    this.setData({
        [dataInfo]: info
    })
}

module.exports = updateValue